package com.cn.service.server.Equipment.Impl;

import com.cn.bean.pojo.lbj.ComponentBasicInformationTable;
import com.cn.bean.pojo.lbj.ComponentSingleRegistrationTable;
import com.cn.bean.pojo.lbj.SingleUpdateStatusSubTable;
import com.cn.bean.pojo.lbj.SingleUpdateStatusTable;
import com.cn.mapper.dao.db5.Equipment.SingleUpdateStatusDao;
import com.cn.service.server.Equipment.SingleUpdateStatusService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class SingleUpdateStatusServiceImpl implements SingleUpdateStatusService {
    @Autowired(required = false)
    private SingleUpdateStatusDao singleUpdateStatusDao;
    @Override
    public List<ComponentBasicInformationTable> selectBasicInformation(ComponentBasicInformationTable componentBasicInformationTable) {
        return singleUpdateStatusDao.selectBasicInformation(componentBasicInformationTable);
    }

    @Override
    public int insertSingleUpdateStatus(SingleUpdateStatusTable singleUpdateStatusTable) {
        Boolean a=singleUpdateStatusDao.insertSingleUpdateStatus(singleUpdateStatusTable);
        if(a){
            return 1;
        }
        return 0;
    }

    @Override
    public int insertSingleUpdateStatusSub(SingleUpdateStatusSubTable subTable) {
        Boolean b=singleUpdateStatusDao.insertSingleUpdateStatusSub(subTable);
        if (b){
            return 1;
        }
        return 0;
    }

    @Override
    public int updateComponentSingleStatus(ComponentSingleRegistrationTable componentSingleRegistrationTable) {
        Boolean c=singleUpdateStatusDao.updateComponentSingleStatus(componentSingleRegistrationTable);
        if (c){
            return 1;
        }
        return 0;
    }

    @Override
    public Integer getSingleUpdateStatusTableAutoid() {
        return singleUpdateStatusDao.getSingleUpdateStatusTableAutoid();
    }

    @Override
    public Integer getSubAutoid() {
        return singleUpdateStatusDao.getSubAutoid();
    }

    @Override
    public int delStatus(int id) {
        Boolean d=singleUpdateStatusDao.delStatus(id);
        if(d){
            return 1;
        }
        return 0;
    }

    @Override
    public int updateCurrent(int id) {
        Boolean x=singleUpdateStatusDao.updateCurrent(id);
        if (x){
            return 1;
        }
        return 0;
    }

    @Override
    public int openCurrent(String partSingleId) {
        Boolean z=singleUpdateStatusDao.openCurrent(partSingleId);
        if (z){
            return 1;
        }
        return 0;
    }
}
